CMAKE_MINIMUM_REQUIRED(VERSION 3.16)

### Judge Top Level
IF (${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_SOURCE_DIR})
  MESSAGE(FATAL_ERROR "This CMakeLists.txt must NOT be TOP-LEVEL!")
ENDIF ()

GET_FILENAME_COMPONENT(PROJECT_NAME ${CMAKE_CURRENT_LIST_DIR} NAME_WE)
PROJECT(${PROJECT_NAME})

### Project
ADD_LIBRARY(${PROJECT_NAME} INTERFACE)
TARGET_LINK_LIBRARIES(${PROJECT_NAME} INTERFACE
        pthread
        )
TARGET_INCLUDE_DIRECTORIES(${PROJECT_NAME} INTERFACE
        ${CMAKE_CURRENT_SOURCE_DIR}/include
        )
